﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Numercial_Analysis
{
    public partial class NumericalAnalysis : Form
    {
        public NumericalAnalysis()
        {
            InitializeComponent();
        }

        private void calculateButton_Click(object sender, EventArgs e)
        {
            ansListBox.Items.Clear();
            int index = methodsComboBox.SelectedIndex;
            if (index == 0)
            {
                ansListBox.Items.Add("Select A Method");
            }
            else
            {
                String temp = equationTextBox.Text;
                try
                {
                    Equation equat = new Equation(temp);
                }
                catch (System.InvalidOperationException exp)
                {
                    ansListBox.Items.Add(exp.ToString());
                }
            }
        }
    }
}
